<!--调度管理-->
<template>
  <div>
    <div v-if="showList&&!addDispatch">
      <!--搜索条件-->
      <div class="order">
        <el-form :inline="true" :model="formInline" class="demo-form-inline">
          <el-form-item label="处置单位" v-if="getCompanyType==4">
            <el-select v-model="formInline.dpId" placeholder="处置单位">
              <el-option :label="item.companyName" :value="item.id" v-for="(item,index) in czCompanyList" :key="index"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="运输单位">
            <el-select v-model="formInline.ysId" placeholder="运输单位">
              <el-option :label="item.companyName" :value="item.id" v-for="item in companyList" :key="item.id"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="状态" class="wasteType">
            <el-select v-model="formInline.status" placeholder="状态">
              <el-option label="已完成" value="1"></el-option>
              <el-option label="流程中" value="0"></el-option>
              <el-option label="异常" value="-1"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="运输时间">
            <el-date-picker v-model="formInline.datePicker" format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd" type="datetimerange" :picker-options="pickerOptions2" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" align="right"></el-date-picker>
          </el-form-item>
          <el-form-item label="司机" class="wasteType">
            <el-input v-model="formInline.driver" placeholder="请输入司机名称"></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="searchResult">查询</el-button>
            <el-button type="default" @click="resetConditions">重置</el-button>
          </el-form-item>
        </el-form>
      </div>
      <!--表格展示-->
      <div class="tables">
        <div class="speculation">
          <el-button type="primary" @click="addDispatchs" v-if="currentLoginCompany==3||currentLoginCompany==4">调度新增</el-button>
          <el-input placeholder="输入转移联单号" class="codeSearch" v-model="code" @input="getSearch"></el-input>
        </div>
        <div class="menuList">
          <ul class="menuTitle">
            <li>
              <span>序号</span>
            </li>
            <li>
              <span>处置单位</span>
            </li>
            <li>
              <span>运输单位</span>
            </li>
            <li>
              <span>司机</span>
            </li>
            <li>
              <span>运输时间</span>
            </li>
            <li>
              <span>车牌照号</span>
            </li>
            <li>
              <span>挂车牌照号</span>
            </li>
            <li>
              <span>状态</span>
            </li>
            <li>
              <span>操作</span>
            </li>
          </ul>
          <ul class="menuBody">
            <li class="menuitem currentParentMenu" v-for="(item,index) in tables" :key="item.id" style="border-bottom: 1px solid #ebeef5">
              <div style="width: 100%;" class="line">
                <div>
                  <!-- <i class="el-icon-circle-plus-outline" style="margin-right: 5px;"></i> -->
                  <span>{{++index}}</span>
                </div>
                <div>
                  <span>{{item.pdName}}</span>
                </div>
                <div>
                  <span>{{item.ysName}}</span>
                </div>
                <div>
                  <span>{{item.driverName}}</span>
                </div>
                <div>
                  <span>{{$dateFormat(item.transportationTime,'yyyy-MM-dd hh:mm:ss')}}</span>
                </div>
                <div>
                  <span>{{item.carNumber}}</span>
                </div>
                <div>
                  <span>{{item.trailerNumber}}</span>
                </div>
                <div>
                  <span>{{item.state===0?'流程中':item.state==-1?'异常':'已完成'}}</span>
                </div>
                <div>
                  <a href=" javascript:;" @click="handleView(item)">查看详情</a>
                  <template v-if="currentLoginCompany==3||currentLoginCompany==4">
                    <a href="javascript:;" @click="changeCar(item)" v-if="item.state===1">换车</a>
                  </template>
                  <!-- <a href="javascript:;" @click="confirmDispatch(item)" v-if="item.wfDConfirm==null&&currentLoginCompany==1">同意</a>
                  <a href="javascript:;" v-if="item.wfDConfirm!=null&&currentLoginCompany==1" class="hasConfirm">已确认</a>
                  <a href="javascript:;" v-if="item.wfDConfirm!=null&&currentLoginCompany==2" class="hasConfirm">已确认</a>
                  <a href="javascript:;" v-if="item.wfDConfirm!=null&&currentLoginCompany==3" class="hasConfirm">已确认</a> -->
                  <a href="javascript:;" @click="unfold($event,item.id,'/op/dispatch/findInfo')" class="open">展开</a>
                  <!-- <a href="javascript:;" v-if="item.ysDConfirm!=null">已确认</a> -->
                  <template v-if="currentLoginCompany==3||currentLoginCompany==4">
                    <a href="javascript:;" @click="recall(item)" v-if="item.state<=0">撤回</a>
                  </template>
                </div>
              </div>
              <ol class="subMenu">
                <li class="subItem" v-for="son in item.children" :key="son.id">
                  <div>
                    <span>转移联单号：{{son.orderCode}}</span>
                  </div>
                  <div>
                    <span>产废公司：{{son.wfCompany}}</span>
                  </div>
                  <div>
                    <span>危废种类：{{son.origin}}</span>
                  </div>
                  <div>
                    <span>危废代码：{{son.wfCode}}</span>
                  </div>
                  <div>
                    <span>重量：{{son.weight}}{{son.unit}}</span>
                  </div>
                  <div>
                    <span>运输时间：{{$dateFormat(item.transportationTime,'yyyy-MM-dd hh:mm:ss')}}</span>
                  </div>
                  <div>
                    <span>状态：{{son.state===0?'待确认':son.state===1?'已完成':son.state===2?'已完成':son.state===3?'已完成':son.state==-1?'调度取消':son.state==-2?'装车取消':son.state==-3?'卸货取消':'异常'}}</span>
                  </div>
                  <div>
                    <template v-if='son.state!=-1'>
                      <a href="javascript:;" v-if='son.wfDConfirm==null&&currentLoginCompany==1' @click="confirmDispatch(son)">同意</a>
                      <a href="javascript:;" v-if='son.dpDConfirm==null&&currentLoginCompany==2' @click="confirmDispatch(son)">同意</a>
                      <a href="javascript:;" v-if='son.ysDConfirm==null&&currentLoginCompany==3' @click="confirmDispatch(son)">同意</a>
                      <a href="javascript:;" v-if='son.wfDConfirm==null&&currentLoginCompany==1' @click='disagreement(son)'>不同意</a>
                      <a href="javascript:;" v-if='son.dpDConfirm==null&&currentLoginCompany==2' @click='disagreement(son)'>不同意</a>
                      <a href="javascript:;" v-if='son.ysDConfirm==null&&currentLoginCompany==3' @click='disagreement(son)'>不同意</a>
                    </template>
                    <a href="javascript:;" style="color: #f40" v-if='son.wfDConfirm!=null&&currentLoginCompany==1'>已确认</a>
                    <a href="javascript:;" style="color: #f40" v-if='son.dpDConfirm!=null&&currentLoginCompany==2'>已确认</a>
                    <a href="javascript:;" style="color: #f40" v-if='son.ysDConfirm!=null&&currentLoginCompany==3'>已确认</a>
                    <template v-if='son.state==0'>
                      <a href="javascript:;" style="color: #357d11" v-if='son.dpDConfirm==null'>处置待确认</a>
                      <a href="javascript:;" style="color: #357d11" v-if='son.ysDConfirm==null'>运输待确认</a>
                      <a href="javascript:;" style="color: #357d11" v-if='son.wfDConfirm==null'>产废待确认</a>
                    </template>
                  </div>
                </li>
              </ol>
            </li>
          </ul>
        </div>
      </div>
      <!--页数展示-->
      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="10" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
    </div>
    <!-- 查看 -->
    <div v-if="!showList&&!addDispatch">
      <el-button type="private" size="small" @click="goBack">返回</el-button>
      <h3 style="margin: 20px 0;">调度基本信息</h3>
      <el-form :inline="true" :model="viewForm" class="demo-form-inline">
        <div>
          <el-form-item label="处置单位">
            <el-input v-model="viewForm.czCompany" placeholder="处置单位" disabled></el-input>
          </el-form-item>
          <el-form-item label="地址">
            <el-input v-model="viewForm.czAddress" placeholder="地址" disabled :title="viewForm.czAddress"></el-input>
          </el-form-item>
          <el-form-item label="联系人">
            <el-input v-model="viewForm.czLinkman" placeholder="联系人" disabled></el-input>
          </el-form-item>
          <el-form-item label="联系方式">
            <el-input v-model="viewForm.czLinkmobile" placeholder="联系方式" disabled></el-input>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="运输单位">
            <el-input v-model="viewForm.ysCompany" placeholder="运输单位" disabled></el-input>
          </el-form-item>
          <el-form-item label="地址">
            <el-input v-model="viewForm.ysAddress" placeholder="地址" :title="viewForm.ysAddress" disabled></el-input>
          </el-form-item>
          <el-form-item label="联系人">
            <el-input v-model="viewForm.ysLinkman" placeholder="联系人" disabled></el-input>
          </el-form-item>
          <el-form-item label="联系方式">
            <el-input v-model="viewForm.ysLinkmobile" placeholder="联系方式" disabled></el-input>
          </el-form-item>
        </div>
        <div>
          <el-form-item label="司机姓名">
            <el-input v-model="viewForm.driver" placeholder="司机姓名" disabled></el-input>
          </el-form-item>
          <el-form-item label="联系方式">
            <el-input v-model="viewForm.driverMobile" placeholder="联系方式" disabled></el-input>
          </el-form-item>
          <el-form-item label="车辆">
            <el-input v-model="viewForm.carNumber" placeholder="车牌" disabled></el-input>
          </el-form-item>
          <el-form-item label="挂车">
            <el-input v-model="viewForm.trailerNumber" placeholder="挂车牌照" disabled></el-input>
          </el-form-item>
          <el-form-item label="预计到达时间">
            <el-input v-model="viewForm.scheduledTime" placeholder="预计到达时间" disabled></el-input>
          </el-form-item>
        </div>
      </el-form>
      <div class="menuList" v-if="!showConfirmBtn">
        <ul class="menuTitle">
          <li>
            <span>序号</span>
          </li>
          <li>
            <span>产废单位</span>
          </li>
          <li>
            <span>地址</span>
          </li>
          <li>
            <span>联系人</span>
          </li>
          <li>
            <span>联系方式</span>
          </li>
          <li>
            <span>危废名称</span>
          </li>
          <li>
            <span>危废类别</span>
          </li>
          <li>
            <span>拟运量</span>
          </li>
          <li>
            <span>单位</span>
          </li>
          <li>
            <span>运输时间</span>
          </li>
          <li>
            <span>状态</span>
          </li>
          <!--  <li>
            <span>操作</span>
          </li>-->
        </ul>
        <ul class="menuBody">
          <li class="menuitem currentParentMenu" v-for="(item,index) in tableData" :key="item.id" style="border-bottom: 1px solid #ebeef5">
            <div style="width: 100%;" class="line">
              <div>
                <i class="el-icon-circle-plus-outline" style="margin-right: 5px;" @click="unfolds($event,item.orderId,'/op/order/findOrderInfo')"></i>
                <span>{{++index}}</span>
              </div>
              <div>
                <span>{{item.wfCompany}}</span>
              </div>
              <div>
                <span>{{item.address}}</span>
              </div>
              <div>
                <span>{{item.linkMan}}</span>
              </div>
              <div>
                <span>{{item.linkMobile}}</span>
              </div>
              <div>
                <span>{{item.origin}}</span>
              </div>
              <div>
                <span>{{item.wfCode}}</span>
              </div>
              <div>
                <span>{{item.weight}}</span>
              </div>
              <div>
                <span>{{item.unit}}</span>
              </div>
              <div>
                <span>{{$dateFormat(item.transportationTime,'yyyy-MM-dd hh:mm:ss')}}</span>
              </div>
              <div>
                <span></span>
              </div>
            </div>
            <ol class="subMenu">
              <li class="subItem" v-for="son in item.children" :key="son.id">
                <div>
                  <span>危废名称：{{son.wfName}}</span>
                </div>
                <div>
                  <span>重量：{{son.wfWeight}}</span>
                </div>
                <div>
                  <span>单位：{{son.unit}}</span>
                </div>
                <!-- 0:手动预警 1：自动预警 2：封袋提示 3：运输申请 4:重新确认 5:调度确认 6:运输确认 -->
                <div>
                  <span>通知：{{son.warnType===0?'手动预警':son.warnType===1?'自动预警':son.warnType==null?'手动预警':''}}</span>
                </div>
              </li>
            </ol>
          </li>
        </ul>
      </div>
      <!-- 运营,运输调度确认 -->
      <div class="menuList" v-if="showConfirmBtn">
        <el-button type='primary' @click='sureAddBigOrder' v-if="currentLoginCompany==3||currentLoginCompany==4">新增</el-button>
        <ul class="menuTitle">
          <li>
            <span>序号</span>
          </li>
          <li>
            <span>产废单位</span>
          </li>
          <li>
            <span>地址</span>
          </li>
          <li>
            <span>联系人</span>
          </li>
          <li>
            <span>联系方式</span>
          </li>
          <li>
            <span>危废名称</span>
          </li>
          <li>
            <span>危废类别</span>
          </li>
          <li>
            <span>拟运量</span>
          </li>
          <li>
            <span>单位</span>
          </li>
          <li>
            <span>运输时间</span>
          </li>
          <li>
            <span>状态</span>
          </li>
          <li>
            <span>备注</span>
          </li>
          <li>
            <span>操作</span>
          </li>
        </ul>
        <ul class="menuBody">
          <li class="menuitem currentParentMenu" v-for="(item,index) in tableData" :key="item.id" style="border-bottom: 1px solid #ebeef5">
            <div style="width: 100%;" class="line">
              <div>
                <i class="el-icon-circle-plus-outline" style="margin-right: 5px;" @click="unfold($event,item.orderId,'/op/order/findOrderInfo')"></i>
                <span>{{++index}}</span>
              </div>
              <div>
                <span>{{item.wfCompany}}</span>
              </div>
              <div>
                <span>{{item.address}}</span>
              </div>
              <div>
                <span>{{item.linkMan}}</span>
              </div>
              <div>
                <span>{{item.linkMobile}}</span>
              </div>
              <div>
                <span>{{item.origin}}</span>
              </div>
              <div>
                <span>{{item.wfCode}}</span>
              </div>
              <div>
                <span>{{item.weight}}</span>
              </div>
              <div>
                <span>{{item.unit}}</span>
              </div>
              <div>
                <span>{{$dateFormat(item.transportationTime,'yyyy-MM-dd hh:mm:ss')}}</span>
              </div>
              <div>
                <span>{{item.state===0?'流程中':item.state===1?'已完成':'异常'}}</span>
              </div>
              <div>
                <span>{{item.remarks}}</span>
              </div>
              <div>
                <!--  -->
                <template>
                  <a href="javascript:;" @click="deleteBigOrder(item)" v-if='item.remarks!= "" && item.remarks!=null'>删除</a>
                </template>
              </div>
            </div>
            <ol class="subMenu">
              <li class="subItem" v-for="son in item.children" :key="son.id">
                <div>
                  <span>危废名称：{{son.wfName}}</span>
                </div>
                <div>
                  <span>重量：{{son.wfWeight}}</span>
                </div>
                <div>
                  <span>单位：{{son.unit}}</span>
                </div>
                <!-- 0:手动预警 1：自动预警 2：封袋提示 3：运输申请 4:重新确认 5:调度确认 6:运输确认 -->
                <div>
                  <span>通知：{{son.warnType===0?'手动预警':son.warnType===1?'自动预警':son.warnType==null?'手动预警':''}}</span>
                </div>
                <div>
                  <span>状态：{{son.state===1?'已完成':'异常'}}</span>
                </div>
              </li>
            </ol>
          </li>
        </ul>
      </div>
      <!-- TODO:地图路线图 -->
      <!-- 确认调度按钮组 -->
      <div class v-if="showConfirmBtn" style="text-align: center;margin-top: 20px;">
        <el-button type="primary" v-if='currentLoginCompany==3||currentLoginCompany==4' @click='allAgreement'>确认</el-button>
        <!--<el-button type="primary" currentLoginCompany==3||currentLoginCompany==4>全部同意</el-button>-->
        <el-button type="default" @click="goBack" v-if='currentLoginCompany==3||currentLoginCompany==4'>取消</el-button>
        <el-button type='primary' v-if='currentLoginCompany!=3&&currentLoginCompany!=4' @click='allAgreement'>同意</el-button>
        <el-button type='primary' v-if='currentLoginCompany!=3&&currentLoginCompany!=4' @click='allDisagree'>不同意</el-button>
        <el-button type='primary' v-if='currentLoginCompany!=3&&currentLoginCompany!=4' @click='reload()'>取消</el-button>
      </div>
    </div>
    <!-- 调度新增 -->
    <div v-if="addDispatch">
      <el-button type="private" size="small" @click="goBack">返回</el-button>
      <el-form :inline="true" :mode="addDispatchSeaerchConditions">
        <el-form-item label="处置单位">
          <el-select v-model="addDispatchSeaerchConditions.dpId" placeholder="处置单位">
            <el-option :label="item.companyName" :value="item.id" v-for="(item,index) in czCompanyList" :key="index"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="运输单位">
          <el-select v-model="addDispatchSeaerchConditions.ysCompany" placeholder="运输单位">
            <el-option :label="item.companyName" :value="item.id" v-for="item in companyList" :key="item.id"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="危废代码">
          <el-select v-model="addDispatchSeaerchConditions.code" placeholder="危废代码">
            <el-option :label="item.name" :value="item.dangerousType" v-for="item in allWasteList" :key="item.id"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="载重量">
          <el-input v-model="addDispatchSeaerchConditions.wfWeight"></el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="AddSearchResult">查询</el-button>
          <el-button type="default" @click="AddResetConditions">重置</el-button>
        </el-form-item>
      </el-form>
      <div v-if='isSelectCompany'>
        <el-table :data="addTableData" stripe style="width: 100%" @selection-change="handleSelectionChange">
          <!-- <el-table-column type="selection" width="55"></el-table-column> -->
          <el-table-column type="index" label="序号" width="60"></el-table-column>
          <el-table-column prop="wfCompany" label="产废单位"></el-table-column>
          <el-table-column prop="address" label="地址" show-overflow-tooltip></el-table-column>
          <el-table-column prop="linkMan" label="联系人"></el-table-column>
          <el-table-column prop="linkMobile" label="联系方式"></el-table-column>
          <el-table-column prop="origin" label="危废名称"></el-table-column>
          <el-table-column prop="wfCode" label="危废类别"></el-table-column>
          <el-table-column prop="wfWeight" label="拟运量"></el-table-column>
          <el-table-column prop="unit" label="单位"></el-table-column>
          <el-table-column label="装车时间" width='250px'>
            <template slot-scope="scope">
              <!-- <span>{{$dateFormat(scope.row.createAt,'yyyy-MM-dd hh:mm:ss')}}</span> -->
              <!-- <el-input v-model="$dateFormat(scope.row.createAt,' yyyy-MM-dd hh:mm:ss')"></el-input> -->
              <el-date-picker v-model="scope.row.transportationTime" type="datetime" placeholder="选择日期时间">
              </el-date-picker>
            </template>
          </el-table-column>
          <el-table-column label="操作">
            <template slot-scope="scope">
              <el-button type="text" size="small" @click="deleteItem(scope.row)">移除</el-button>
            </template>
          </el-table-column>
        </el-table>
        <el-form :inline="true" :model="addDispatchInfo" class="addDispatchInfo" :rules="rules" ref="addDispatchInfo">
          <el-form-item label="司机" prop="driver">
            <el-select v-model="addDispatchInfo.driver" @change='getDriverId'>
              <el-option v-for="item in driverList" :key="item.id" :label="item.driverName" :value="item.id"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="联系方式" prop="linkMobile">
            <el-input v-model="addDispatchInfo.linkMobile" disabled></el-input>
          </el-form-item>
          <el-form-item label="车辆" prop="carNumber">
            <el-select v-model="addDispatchInfo.carNumber">
              <el-option v-for="item in carHeadList" :key="item.id" :label="item.carNumber" :value="item.id"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="挂车" prop="trailer" v-if='carList.length!=0'>
            <el-select v-model="addDispatchInfo.trailer">
              <el-option v-for="item in carList" :key="item.id" :label="item.carNumber" :value="item.id"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="预计接收时间" prop="arriveTimer">
            <el-date-picker v-model="addDispatchInfo.arriveTimer" type="datetime" placeholder="选择日期时间" default-time="12:00:00" format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd"></el-date-picker>
          </el-form-item>
          <br>
          <br>
          <div style="text-align: center;">
            <el-form-item>
              <el-button type="primary" @click="sureDispatch('addDispatchInfo')">调度确认</el-button>
              <el-button type="default" @click="reload()">取消</el-button>
            </el-form-item>
          </div>
        </el-form>
      </div>
    </div>
    <!--地图的model-->
    <el-dialog title="提示" :visible.sync="mapIsShow" width="80%">
      <div id="container"></div>
      <div class='info'>
        <ul>
          <li v-for='tot in mapCurrentList'>{{tot.wfCompany}}</li>
        </ul>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="mapIsShow = false">取 消</el-button>
        <el-button type="primary" @click="mapCompanySelect">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 这是确认调度中的新增模态框 -->
    <el-dialog title="提示" :visible.sync="addProcessDispatch" width="80%">
      <div>
        <el-table :data="newAddTable" style="width: 100%" @select="handleSelectionChangeDispatchAdd">
          <el-table-column type="selection" width="30">
          </el-table-column>
          <el-table-column type="index" label="序号" width="50">
          </el-table-column>
          <el-table-column prop="wfCompany" label="产废单位">
          </el-table-column>
          <el-table-column prop="address" label="地址" show-overflow-tooltip>
          </el-table-column>
          <el-table-column prop="linkMan" label="联系人">
          </el-table-column>
          <el-table-column prop="linkMobile" label="联系方式" width="120">
          </el-table-column>
          <el-table-column prop="origin" label="危废名称" width="120">
          </el-table-column>
          <el-table-column prop="wfCode" label="危废类别">
          </el-table-column>
          <el-table-column prop="wfWeight" label="拟运量" width="100">
          </el-table-column>
          <el-table-column prop="unit" label="单位" width="50">
          </el-table-column>
          <el-table-column label="分配时间">
            <template slot-scope="scope">
              <span>{{$dateFormat(scope.row.createAt,'yyyy-MM-dd hh:mm:ss')}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="address" label="运输时间" width="250">
            <template slot-scope="scope">
              <el-date-picker v-model="scope.row.transportationTime" type="datetime" placeholder="选择日期时间">
              </el-date-picker>
            </template>
          </el-table-column>
        </el-table>
        <el-pagination @size-change="handleSizeChange1" @current-change="handleCurrentChange1" :current-page="currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="10" layout="total, sizes, prev, pager, next, jumper" :total="total1"></el-pagination>
      </div>
      <div class="modalFooter" style="text-align: center;">
        <el-button type="primary" @click="submitAdd">确认添加</el-button>
        <el-button @click="addProcessDispatch = false;">取 消</el-button>
      </div>
    </el-dialog>
    <!-- 不同意的框子 -->
    <el-dialog title="提示" :visible.sync="remarksModel" width="30%">
      <h3 style="height:40px;line-height: 40px;font-size:18px">不同意原因:</h3>
      <div style="margin-bottom: 30px;">
        <el-input type="textarea" :autosize="{ minRows: 5, maxRows: 8}" placeholder="请输入内容" v-model="textarea3">
        </el-input>
      </div>
      <div class="modalFooter" style="text-align: center;">
        <el-button type="primary" @click="remarkConfirm">确认</el-button>
        <el-button @click="remarksModel = false;">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
function arrayUnique2(arr, name) {
  var hash = {};
  return arr.reduce(function(item, next) {
    hash[next.wfId] ? '' : hash[next.wfId] = true && item.push(next);
    return item;
  }, []);
}
export default {
  inject: ["reload"],
  data() {
    return {
      radio: '1',
      agreeOrDisagree: false,
      transportaionTimeMustSelect: '',
      carHeadList: [],
      carList: [],
      isSelectCompany: false,
      driverList: [],
      textarea3: '',
      remarksModel: false,
      newAddTable: [],
      newAddTime: '',
      addProcessDispatch: false,
      orderDown: [],
      tables: [],
      dialogDispatchTables: [],
      tableData: [],
      // 搜索条件
      formInline: {
        productionCompany: "",
        disposition: "",
        wasteType: null,
        status: null,
        datePicker: [],
        driver: null,
        ysId: null,
        dpId: null,
        wfWeight: ""
      },
      // 查看调度
      viewForm: {
        czCompany: "",
        czAddress: "",
        czLinkman: "",
        czLinkmobile: "",
        ysCompany: "",
        ysAddress: "",
        ysLinkman: "",
        ysLinkmobile: "",
        driver: "",
        driverMobile: "",
        carNumber: "",
        trailerNumber: "",
        scheduledTime: ""
      },
      addDispatch: false,
      pickerOptions2: {
        shortcuts: [{
            text: "最近一周",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit("pick", [start, end]);
            }
          },
          {
            text: "最近一个月",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
              picker.$emit("pick", [start, end]);
            }
          },
          {
            text: "最近三个月",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
              picker.$emit("pick", [start, end]);
            }
          }
        ]
      },
      currentPage: 1,
      total: 0,
      limit: 10,
      page: 1,
      getCompanyType: null,
      code: null,
      companyList: [],
      czCompanyList: [],
      showList: true,
      showConfirmBtn: false,
      // 调度新增
      addTableData: [],
      allWasteList: [],
      addDispatchInfo: {
        driver: "",
        linkMobile: "",
        carNumber: "",
        trailer: "",
        arriveTimer: ""
      },
      mapIsShow: false,
      addDispatchSeaerchConditions: {
        dpId: "",
        ysCompany: "",
        code: "",
        wfWeight: ""
      },
      rules: {
        driver: [{
          type: 'number',
          required: true,
          message: "请输入司机名称",
          triggle: "change"
        }],
        carNumber: [{
          type: 'number',
          required: true,
          message: "请输入车牌号码",
          triggle: "blur"
        }],
        linkMobile: [
          { required: true, message: "请输入联系方式", triggle: "blur" }
        ],
        trailer: [
          { type: 'number', required: true, message: "请输入挂车牌照", triggle: "blur" }
        ],
        arriveTimer: [
          { required: true, message: "请选择到达时间", triggle: "blur" }
        ]
      },
      confirmBtnAdd: false,
      total1: 0,
      limit1: 10,
      page1: 1,
      multipleSelection: [],
      currentLoginCompany: "",
      currentDisagreeId: '',
      disagreementTypes: null,
      points: [],
      mapCurrentList: [],
      currentSelectList: {}
    };
  },
  mounted() {
    this.initDataList();
    this.getCompanyType = localStorage.companyType;
    // 查询运输公司
    this.$common
      .$ajax(
        "/sys/company/select", {
          companyType: 3
        },
        "get"
      )
      .then(res => {
        // console.log(res.data.body)
        this.companyList = res.data.body;
      });
    this.$common
      .$ajax(
        "/sys/company/select", {
          companyType: 2
        },
        "get"
      )
      .then(res => {
        // console.log(res.data.body)
        this.czCompanyList = res.data.body;
      });

    // 查询所有危废类别
    this.$common.$ajax("/wf/wastetype/wastetype", {}, "get").then(res => {
      this.allWasteList = res.data.body;
    });

    // 获取当前登录用户的额公司类型
    this.currentLoginCompany = localStorage.companyType
  },

  methods: {
    getCurrentRadio(val) {
      alert(val)
    },
    // 调度确认按钮
    // dispatchCofirm() {
    //   this.$common.$ajax('/op/dispatch/updateCarpool', {}, 'get').then()
    // },
    // 产废不同意
    allDisagree() {
      this.remarksModel = true;

    },
    allAgreement() { //批量同意
      console.log(this.tableData)
      var ids = [];
      this.tableData.forEach(item => {
        // ids = {
        //   ids: item.id
        // }
        ids.push(item.id)
      })
      console.log(ids.toString())
      this.$common.$ajax('/op/dispatch/allAgree?type=1&ids=' + ids.toString(), {}, 'get').then(res => {
        this.$message({
          type: 'success',
          message: '确认成功'
        })
      })
    },
    getDriverId(val) {
      this.driverList.forEach(item => {
        if (item.id == val) {
          this.addDispatchInfo.linkMobile = item.phoneNumber
        }
      })
    },
    mapCompanySelect() {
      this.addTableData = [];
      this.mapIsShow = false;
      if (this.mapCurrentList.length == 0) {
        this.isSelectCompany = false;
      } else {
        this.isSelectCompany = true;
        this.mapCurrentList.forEach(item => {
          this.$common.$ajax('/op/dispatch/findTransport', { page: 1, limit: 100000, wfId: item.wfId }, 'get').then(res => {
            // 获取公司下的所有单子
            console.log("+++++++++++++**********************s")
            this.addTableData = this.addTableData.concat(res.data.body.list)
            console.log(res.data.body.list)
          });

        })

        // this.addTableData = this.mapCurrentList;

        // 获取司机信息
        this.$common.$ajax('/ys/driver/list', {
          page: 1,
          limit: 100000,
          companyId: this.addDispatchSeaerchConditions.ysCompany
        }, 'get').then(res => {
          this.driverList = res.data.body.list;
        })
        // 获取车头信息
        this.$common.$ajax('/ys/car/list', { page: 1, limit: 100000, companyId: this.addDispatchSeaerchConditions.ysCompany, position: 4 }, 'get').then(res => {
          this.carHeadList = res.data.body.list;
        })

        // 获取挂车信息
        this.$common.$ajax('/ys/car/list', { page: 1, limit: 100000, companyId: this.addDispatchSeaerchConditions.ysCompany, position: 3 }, 'get').then(res => {
          this.carList = res.data.body.list;
        })
      }
    },
    AddSearchResult() {
      if (this.addDispatchSeaerchConditions.dpId == '' || this.addDispatchSeaerchConditions.ysCompany == '') {
        this.$message({
          type: 'warn',
          message: '请选择运输单位和处置单位后进行查询！',
          duration: 1000
        })
      } else {
        this.mapIsShow = true;
        this.$common.$ajax("/op/dispatch/findTransport", {
          page: 1,
          limit: 10,
          dpId: this.addDispatchSeaerchConditions.dpId,
          ysId: this.addDispatchSeaerchConditions.ysCompany,
          code: this.addDispatchSeaerchConditions.code,
          wfWeight: this.addDispatchSeaerchConditions.wfWeight
        }, "get").then(res => {
          var _this = this
          this.points = res.data.body.list;
          var centerLon = JSON.parse(localStorage.currentLoginInfos).lon || '';
          var centerLat = JSON.parse(localStorage.currentLoginInfos).lat || '';
          var map = new AMap.Map('container', {
            resizeEnable: true, //是否监控地图容器尺寸变化
            zoom: 4, //初始化地图层级
            center: [centerLon, centerLat] //初始化地图中心点
          });

          // 选过的设置为红色（二次进入）
          console.log('二次进入')
          console.log(this.mapCurrentList)

          var currentPushArr = []
          for (let i = 0; i < this.points.length; i++) {
            console.log('++++++++++++获取公司Id+++++++++++++++')
            console.log(this.points[i])
            var item = this.points[i];
            item.isClick = false;
            var marker = new AMap.Marker({
              position: new AMap.LngLat(item.wfLon, item.wfLat), // 
              title: item.wfCompany,
              extData: item
            });

            currentPushArr.push(marker)

            marker.setLabel({
              offset: new AMap.Pixel(15, 15),
              content: item.wfCompany
            });
            console.log('初始化啊 ')
            console.log('+++=======mapCurrentList=========')
            console.log(this.mapCurrentList)
            if (this.mapCurrentList.length != 0) {
              for (var i = 0; i < this.mapCurrentList.length; i++) {

                console.log('请求数据啦')
                console.log(currentPushArr)
                for (var j = 0; j <= currentPushArr.length - 1; j++) {
                  console.log(currentPushArr[j].getExtData())
                  if (this.mapCurrentList[i].wfId == currentPushArr[j].getExtData().wfId) {

                    currentPushArr[j].setIcon('../../../static/mark_bs.png')
                    currentPushArr[j].isClick = true;
                  }
                }
              }
            }
          }

          map.add(currentPushArr);
          map.setFitView()
          currentPushArr.forEach(item => {
            item.on('click', function() {
              if (!item.isClick) {
                item.isClick = true;
                // item.setIcon('/src/assets/mark_bs.png')
                item.setIcon('../../../static/mark_bs.png')
                console.log()
                _this.mapCurrentList.push(item.getExtData())
              } else {
                item.isClick = false;
                item.setIcon('../../../static/b.png')
                // item.setIcon('/src/assets/b.png')
                _this.mapCurrentList.forEach((cur, idx) => {
                  if (item.getExtData().wfId == cur.wfId) {
                    _this.mapCurrentList.splice(idx, 1)
                  }
                })
              }
            })
          })

          // this.addTableData = res.data.body.list;
        });
      }


    },
    AddResetConditions() {
      for (let item in this.addDispatchSeaerchConditions) {
        this.addDispatchSeaerchConditions[item] = "";
      }
      // this.addDispatchs();
    },
    // 新增的时候获取可添加的公司信息
    getCanUseCompany() {
      this.$common.$ajax("/op/dispatch/findTransport", {
            page: 1,
            limit: 10,
            dpId: this.addDispatchSeaerchConditions.dpId,
            ysId: this.addDispatchSeaerchConditions.ysCompany,
            code: this.addDispatchSeaerchConditions.code,
            wfWeight: this.addDispatchSeaerchConditions.wfWeight
          },
          "get"
        )
        .then(res => {
          this.points = res.data.body.list;
          // this.addTableData = res.data.body.list;
        });
    },
    //   初始化调度列表
    initDataList() {
      var currentstatus = '';
      if (this.formInline.status == -1) {
        currentstatus = '-1'
      } else if (this.formInline.status == 0) {
        currentstatus == '0'
      } else if (this.formInline.status == 1) {
        currentstatus = '1,2,3'
      }
      this.$common.$ajax("/op/dispatch/findList", {
            dpId: this.formInline.dpId,
            code: this.code,
            ysId: this.formInline.ysId,
            states: currentstatus,
            startTime: this.formInline.datePicker ?
              this.formInline.datePicker[0] : null,
            endTime: this.formInline.datePicker ?
              this.formInline.datePicker[1] : null,
            driverName: this.formInline.driver
          },
          "get"
        )
        .then(res => {
          console.log(res.data);
          res.data.body.list.forEach(item => {
            item.children = [];
            this.$common
              .$ajax("/op/dispatch/findInfo", { id: item.id }, "get")
              .then(xhr => {

                item.children = xhr.data.body;
              });
            console.log(item);
          });
          this.tables = res.data.body.list;
          this.total = res.data.body.total;
        });
    }, //展开折叠
    unfold(e, id, url) {
      var isUnfold = false;
      // 获取当前的子列表
      var child_node =
        e.currentTarget.parentElement.parentElement.nextElementSibling;
      if (e.currentTarget.classList.contains("open")) {
        child_node.style.display = "block";
        e.currentTarget.classList.add("folder");
        e.currentTarget.classList.remove("open");
        e.target.innerHTML = '收起'
        console.log("我是展开啦");
      } else {
        child_node.style.display = "none";
        e.currentTarget.classList.add("open");
        e.currentTarget.classList.remove("folder");
        e.target.innerHTML = '展开'
      }
    },
    unfolds(e, id, url) {
      var isUnfold = false;
      // 获取当前的子列表
      var child_node =
        e.currentTarget.parentElement.parentElement.nextElementSibling;
      if (e.currentTarget.classList.contains("el-icon-circle-plus-outline")) {
        child_node.style.display = "block";
        e.currentTarget.classList.add("el-icon-remove-outline");
        e.currentTarget.classList.remove("el-icon-circle-plus-outline");
        console.log('我是展开啦')

      } else {
        child_node.style.display = "none";
        e.currentTarget.classList.add("el-icon-circle-plus-outline");
        e.currentTarget.classList.remove("el-icon-remove-outline");
      }
    },

    // 获取公司信息
    getCompanyInfo(type) {
      var arr = [];
      this.$common
        .$ajax(
          "/sys/company/select", {
            companyType: type
          },
          "get"
        )
        .then(res => {
          // console.log(res.data.body)
          arr = res.data.body;
        });
      return arr;
    },
    searchResult() {
      this.initDataList();
    },
    getSearch() {
      this.$common
        .$ajax(
          "/op/dispatch/findList", {
            code: this.code
          },
          "get"
        )
        .then(res => {
          console.log(res.data);
          this.tables = res.data.body.list;
          this.total = res.data.body.total;
        });
    },
    resetConditions() {
      for (let item in this.formInline) {
        console.log(item);

        if (Array.isArray(this.formInline[item])) {
          this.formInline[item] = [];
        } else {
          this.formInline[item] = "";
        }
      }
      this.initDataList();
    },

    handleClick(row) {
      console.log(row);
    },
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
      this.limit = val;
      this.initDataList();
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
      this.page = val;
      this.initDataList();
    },
    //调度新增
    addDispatchs() {
      this.showList = false;
      this.addDispatch = true;
      this.confirmBtnAdd = true;

    },

    //查看
    handleView(row) {

      this.showList = false;
      // this.$common.$ajax('op/dispatch/findList', { id: row.carpoolId }, 'get').then(res => {
      // })

      this.viewForm.czCompany = row.pdName;
      this.viewForm.czLinkman = row.pdLinkMan;
      this.viewForm.czAddress = row.pdAddress;
      this.viewForm.czLinkmobile = row.pdLinkMobile;

      this.viewForm.ysCompany = row.ysName;
      this.viewForm.ysAddress = row.ysAddress;
      this.viewForm.ysLinkman = row.ysLinkMan;
      this.viewForm.ysLinkmobile = row.ysLinkMobile;

      this.viewForm.driver = row.driverName;
      this.viewForm.driverMobile = row.driverPhone;
      this.viewForm.carNumber = row.carNumber;
      this.viewForm.trailerNumber = row.trailerNumber;
      this.viewForm.scheduledTime = row.arrivalTime;

      this.tableData.push(row)
      this.$common.$ajax("/op/dispatch/findInfo", { id: row.id }, "get").then(res => {
        var tableData = res.data.body
        tableData.forEach(item => {
          item.children = [];
          this.$common
            .$ajax("/op/order/findOrderInfo", { id: item.orderId }, "get")
            .then(xhr => {
              item.children = xhr.data.body;
            });

        });
        this.tableData = tableData;
        console.log(this.tableData);
      });
    },
    // 确认调度
    confirmDispatch(row) {
      this.currentSelectList = row;
      console.log(row)
      // 新开页面进行确认
      // console.log('卧槽')
      // console.log(row);
      // // 存贮此条数据的carpoolId
      // sessionStorage.carpoolId = this.currentSelectList.id
      // this.showList = false;

      // this.showConfirmBtn = true;
      // this.viewForm.czCompany = this.currentSelectList.pdName;
      // this.viewForm.czLinkman = this.currentSelectList.pdLinkMan;
      // this.viewForm.czAddress = this.currentSelectList.pdAddress;
      // this.viewForm.czLinkmobile = row.pdLinkMobile;

      // this.viewForm.ysCompany = this.currentSelectList.ysName;
      // this.viewForm.ysAddress = this.currentSelectList.ysAddress;
      // this.viewForm.ysLinkman = this.currentSelectList.ysLinkMan;
      // this.viewForm.ysLinkmobile = this.currentSelectList.ysLinkMobile;

      // this.viewForm.driver = this.currentSelectList.driverName;
      // this.viewForm.driverMobile = this.currentSelectList.driverPhone;
      // this.viewForm.carNumber = this.currentSelectList.carNumber;
      // this.viewForm.trailerNumber = this.currentSelectList.trailerNumber;
      // this.viewForm.scheduledTime = this.currentSelectList.arrivalTime;
      // this.agreeOrDisagree = true;
      this.$confirm("此操作将同意该项, 是否继续?", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        })
        .then(() => {
          this.disagreementTypes = 1
          this.$common.$ajax('/op/dispatch/agree', { id: row.id, type: this.disagreementTypes }, 'get').then(res => {
            this.$message({
              type: 'success',
              message: '操作成功'
            })
            // this.confirmDispatch()
            // this.remarksModel = false
            this.reload()
          })
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消同意"
          });
        });
      localStorage.currentTransportId = row.id;

    },
    // 调度确认中的删除

    // 确认调度按钮提交
    sureDispatch(formName) {
      this.$refs[formName].validate(valid => {
        if (valid) {
          var arrIds = [];
          this.addTableData.forEach((item, index) => {
            console.log(item)
            if (item.transportationTime == null || item.transportationTime == '') {
              this.$message({
                type: 'warn',
                message: '请填写装车时间'
              })
              return false
            }
          })
          this.$common.$ajax('/op/dispatch/carpool', {
            headstockId: this.addDispatchInfo.carNumber,
            driverId: this.addDispatchInfo.driver,
            trailerId: this.addDispatchInfo.trailer,
            dpId: this.addDispatchSeaerchConditions.dpId,
            ysId: this.addDispatchSeaerchConditions.ysCompany,
            orderIds: this.addTableData
          }, 'post').then(res => {
            console.log('我是提交=======')
            console.log(res.data)
            this.$message({
              type: 'success',
              message: "添加调度成功"
            })
            this.reload()
          })
        } else {
          console.log("error  submit");
        }
      });
    },
    recall(row) {
      this.dialogVisibleDispatch = true;
      // this.dialogDispatch = "撤回";
      this.$confirm("此操作将永久撤回该选项, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(() => {
        this.$common.$ajax("/op/dispatch/withdraw", { id: row.id }, "get").then(res => {
          if (res.data.status === 200) {
            this.$message({
              type: "success",
              message: "撤回成功!"
            });
            this.reload();
          }
        });
      }).catch(() => {
        this.$message({
          type: "info",
          message: "已取消撤回"
        });
      });
    },
    goBack() {
      this.reload();
    },
    handleSelectionChange(val) {
      console.log(val);
    },
    handleSelectionChangeDispatchAdd(val) {
      this.multipleSelection = val
      console.log(val)
    },
    deleteItem(row) {
      console.log(row);
      this.addTableData.forEach((item, index) => {
        if (item.wfId == row.wfId) {
          this.addTableData.splice(index, 1)
        }
      })
      if (this.addTableData.length == 0) {
        this.isSelectCompany = false;
      }
    },
    sureAddBigOrder() {
      this.addProcessDispatch = true;
      // 请求数据，塞到里面去
      this.initNewAddList()
    },
    initNewAddList() {
      this.$common.$ajax('/op/dispatch/findTransport', {
        page: this.page1,
        limit: this.limit1
      }, 'get').then(res => {
        this.newAddTable = res.data.body.list;
        this.total1 = res.data.body.total;
      })
    },
    submitAdd() {
      // 首先判断是否选择的某条数据
      if (this.multipleSelection.length == 0) {
        //说明此刻没有选择任何数据
        this.$message({
          type: 'warn',
          message: '请选择某一条数据！'
        })
      } else {
        this.multipleSelection.map(item => {
          return {
            orderId: item.id,
            transportationTime: item.transportationTime
          }
        })
        this.$common.$ajax('/op/dispatch/addBagOrder', {
          dispatchCarpoolId: sessionStorage.carpoolId,
          orders: this.multipleSelection
        }, 'get').then(res => {
          console.log(res.data)
        })
      }
    },

    deleteBigOrder(row) {
      console.log(row)
      this.$common.$ajax('/op/dispatch/delBagOrder', { id: row.id }, 'get').then(res => {
        this.$message({
          type: 'success',
          message: '删除成功'
        })
        this.$common
          .$ajax("/op/dispatch/findInfo", { id: localStorage.currentTransportId }, "get")
          .then(res => {
            res.data.body.forEach(item => {
              item.children = [];
              this.$common
                .$ajax("/op/order/findOrderInfo", { id: item.orderId }, "get")
                .then(res => {
                  item.children = res.data.body;
                });
              console.log(item);
            });

            this.tableData = res.data.body;
          });
      })
    },
    handleSizeChange1(val) {
      this.limit1 = val;
      this.initNewAddList()
    },
    handleCurrentChange1(val) {
      this.page1 = val
      this.initNewAddList()
    },
    disagreement(row) {
      console.log(row)
      this.remarksModel = true
      this.currentDisagreeId = row.id
      this.disagreementTypes = -1
    },
    agreement(row) {
      // this.remarksModel = true
      this.currentDisagreeId = row.id
      this.disagreementTypes = 1
      this.$common.$ajax('/op/dispatch/agree', { id: this.currentDisagreeId, type: this.disagreementTypes }, 'get').then(res => {
        this.$message({
          type: 'success',
          message: '操作成功'
        })
        this.confirmDispatch()
        this.remarksModel = false
      })
    },
    remarkConfirm(row) {
      if (this.textarea3 == '') {
        this.$message({
          type: 'warn',
          message: '请输入不同意原因'
        })
      } else {
        this.$common.$ajax('/op/dispatch/agree', { id: this.currentDisagreeId, type: -1, message: this.textarea3 }, 'get').then(res => {
          this.$message({
            type: 'success',
            message: '操作成功'
          })
          this.remarksModel = false;
          this.reload()
          // this.confirmDispatch();

        })
      }


    }

  },
  components: {}
};

</script>
<style lang="scss">
.demo-form-inline {
  padding-left: 20px;
}

.elHight {
  height: auto !important;
}

.order {
  border-radius: 10px;
  padding-top: 30px;
  background-color: #f7f7f7;
}

.result span {
  font-size: 15px;
  margin-left: 20px;
}

.speculation {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
}

.dispatchForm {
  border-radius: 10px;
  margin-top: 20px;
  padding-top: 30px;
  background-color: #f7f7f7;
}

.dispatchMap {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-around;
  height: calc(100vh - 20vh);
  margin-top: 10px;
}

.dispatchMapItem {
  flex-grow: 5;
}

.dispatchMapList {
  margin-left: 10px;
  flex-grow: 1;
  width: 20%;
}

.isFiltrateTable {
  margin-top: 30px;
  margin-left: 10px;
  margin-right: 10px;
}

.isFiltratecheckbox {
  margin-top: 30px;
}

.isFiltratecheckboxButtom {
  margin-top: 20px;
}

.affirmHead {
  margin-left: 20px;
  font-size: 20px;
}

.affirmHeadInfo {
  margin-top: 30px;
  padding-top: 20px;
  background-color: #f7f7f7;
}

.affirmHeadInfoInput input {
  background-color: #ffffff !important;
}

.afirmRecord {
  border: 1px solid #cccccc;
  margin-top: 10px;
  display: flex;
  flex-direction: row;
}

.aheckTable {
  border: 1px solid #cccccc;
  margin-top: 20px;
}

.aheckButtom {
  margin-top: 10px;
}

.aheckMapItem {
  height: calc(100vh - 20vh);
  margin-top: 10px;
}

.modificationButtom {
  margin-top: 20px;
}

.speculation {
  margin-top: 10px;
}

.dispatchForm {
  border-radius: 10px;
  margin-top: 20px;
  padding-top: 30px;
  background-color: #f7f7f7;
}

.dispatchMap {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-around;
  height: calc(100vh - 20vh);
  margin-top: 10px;
}

.dispatchMapItem {
  flex-grow: 5;
}

.dispatchMapList {
  margin-left: 10px;
  flex-grow: 1;
  width: 20%;
}

.isFiltrateTable {
  margin-top: 30px;
  margin-left: 10px;
  margin-right: 10px;
}

.isFiltratecheckbox {
  margin-top: 30px;
}

.isFiltratecheckboxButtom {
  margin-top: 20px;
}

.menuList {
  width: 100%;
  margin-top: 30px;

  .menuTitle {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #ebeef5;

    li {
      height: 40px;
      // width: 18%;
      width: calc(100% / 7);

      span {
        font-size: 16px;
        display: inline-block;
        height: 100%;
        line-height: 40px;
        width: 100%;

        text-align: left;
      }

      // &:nth-child(3) {
      // width: 10%
      // }
    }
  }

  .menuBody {
    border-bottom: 1px solid #ebeef5;
    width: 100%;

    li.menuitem {
      width: 100%;

      div {
        height: 50px;
        display: flex;
        width: calc(100% / 7);
        align-items: center;
        font-size: 14px;

        // &:nth-child(3) {
        //   width: 10%
        // }

        a {
          margin-right: 15px;
          color: #409eff;

          &:hover {
            cursor: pointer;
            color: #1268c1;
          }
        }
      }
    }
  }

  .subMenu {
    width: 100%;
    min-height: 50px;
    display: none;
    padding-left: 20px;

    .subItem {
      width: 100%;
      height: 50px;
      display: flex;
      justify-content: space-around;

      div {
        width: auto;

        span {
          display: block;
          width: 100%;
          text-align: center;
        }
      }
    }
  }
}

.codeSearch {
  width: 200px !important;
}

#container {
  width: 100%;
  height: 100%;
}

#panel {
  position: fixed;
  background-color: white;
  max-height: 90%;
  overflow-y: auto;
  top: 10px;
  right: 10px;
  width: 280px;
}

.addDispatchInfo {
  margin-top: 30px;
}

#container {
  height: 500px;
  width: 100%;
}

.amap-marker-label {
  position: absolute;
  z-index: 2;
  border: 1px solid #ccc;
  background-color: white;
  white-space: nowrap;
  cursor: default;
  padding: 3px;
  font-size: 12px;
  line-height: 14px;
}

.info {
  padding: .75rem 1.25rem;
  margin-bottom: 1rem;
  border-radius: .25rem;
  position: fixed;
  top: 2.4rem;
  background-color: white;
  height: auto;
  width: 15rem;
  border-width: 0;
  right: 1rem;
  line-height: 20px;
  box-shadow: 0 2px 6px 0 rgba(114, 124, 245, .5);
}

.hasConfirm {
  color: #333 !important;
}

</style>
